#include"Reactor.hpp"
#include"Listener.hpp"
using namespace kzz;

int main(int argc,char **argv)
{
    if (argc != 2)
    {
       kzz::LOG(LogLevel::ERROR) << "服务器端参数传入错误";
        return 2;
    }
    
    std::shared_ptr<Connection> listen
    =std::make_shared<Listener >(std::stoi(argv[1]));
    //listen->
    Reactor reat;

 listen->SetOwner(&reat);

    

    reat.AddConnection(listen);
    reat.Start();


    return 0;
}